package com.emcom.gotour.mvc.view;

import java.io.Serializable;
import java.util.List;

import com.emcom.gotour.po.TourContent;
import com.emcom.gotour.vo.TourContentVO;
import org.apache.commons.lang.builder.CompareToBuilder;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

public class DetailView implements Comparable<Object>, Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -7180187793423936843L;
	private String title;
	private String typeImageUrl;
	private String scheduler;
	private TourContentVO tourContent;
	private List<TourContent> popularList;
	private TourContentView tourContentView;
	private SchedulerContentView schedulerContentView;
	private MenuView menuView;
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getTypeImageUrl() {
		return typeImageUrl;
	}
	public void setTypeImageUrl(String typeImageUrl) {
		this.typeImageUrl = typeImageUrl;
	}
	public String getScheduler() {
		return scheduler;
	}
	public void setScheduler(String scheduler) {
		this.scheduler = scheduler;
	}
	public TourContentVO getTourContent() {
		return tourContent;
	}
	public void setTourContent(TourContentVO tourContent) {
		this.tourContent = tourContent;
	}
	public List<TourContent> getPopularList() {
		return popularList;
	}
	public void setPopularList(List<TourContent> popularList) {
		this.popularList = popularList;
	}
	public TourContentView getTourContentView() {
		return tourContentView;
	}
	public void setTourContentView(TourContentView tourContentView) {
		this.tourContentView = tourContentView;
	}
	public SchedulerContentView getSchedulerContentView() {
		return schedulerContentView;
	}
	public void setSchedulerContentView(SchedulerContentView schedulerContentView) {
		this.schedulerContentView = schedulerContentView;
	}
	public MenuView getMenuView() {
		return menuView;
	}
	public void setMenuView(MenuView menuView) {
		this.menuView = menuView;
	}
	/**
	 * @see java.lang.Comparable#compareTo(Object)
	 */
	public int compareTo(Object object) {
		DetailView myClass = (DetailView) object;
		return new CompareToBuilder()
				.append(this.tourContentView, myClass.tourContentView)
				.append(this.title, myClass.title)
				.append(this.schedulerContentView, myClass.schedulerContentView)
				.append(this.scheduler, myClass.scheduler).append(
						this.tourContent, myClass.tourContent).append(
						this.menuView, myClass.menuView).append(
						this.popularList, myClass.popularList).append(
						this.typeImageUrl, myClass.typeImageUrl).toComparison();
	}
	/**
	 * @see java.lang.Object#equals(Object)
	 */
	public boolean equals(Object object) {
		if (!(object instanceof DetailView)) {
			return false;
		}
		DetailView rhs = (DetailView) object;
		return new EqualsBuilder().appendSuper(super.equals(object)).append(
				this.tourContentView, rhs.tourContentView).append(this.title,
				rhs.title).append(this.schedulerContentView,
				rhs.schedulerContentView).append(this.scheduler, rhs.scheduler)
				.append(this.tourContent, rhs.tourContent).append(
						this.menuView, rhs.menuView).append(this.popularList,
						rhs.popularList).append(this.typeImageUrl,
						rhs.typeImageUrl).isEquals();
	}
	/**
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		return new HashCodeBuilder(1070728997, 728447271).appendSuper(
				super.hashCode()).append(this.tourContentView).append(
				this.title).append(this.schedulerContentView).append(
				this.scheduler).append(this.tourContent).append(this.menuView)
				.append(this.popularList).append(this.typeImageUrl)
				.toHashCode();
	}
	/**
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return new ToStringBuilder(this).append("schedulerContentView",
				this.schedulerContentView).append("tourContentView",
				this.tourContentView).append("typeImageUrl", this.typeImageUrl)
				.append("popularList", this.popularList).append("scheduler",
						this.scheduler).append("menuView", this.menuView)
				.append("tourContent", this.tourContent).append("title",
						this.title).toString();
	}
}
